import java.util.Scanner;
class volume {
	private double x,y;
	protected void masukan()
	{
		Scanner in = new Scanner(System.in);
		double 
		System.out.print("#inputkan Jari-jari Silinder : ");
		x=in.nextDouble();
		System.out.print("#inputkan Tinggi Silinder : ");
		y=in.nextDouble();
	
		double a,b;
		System.out.print("#inputkan Jari-jari Kerucut : ");
		a=in.nextDouble();
		System.out.print("#inputkan Tinggi Kerucut : ");
		b=in.nextDouble();
		
		silinder si = new silinder();
		si.hitung(x,y);
		//mencobaaaaaa
		kerucut ck = new kerucut();
		ck.hitung1(a,b);
	}
}
class silinder extends volume
{
	public void hitung(double x, double y)
	{
		double luas=3.14*x*x;
		double v=luas*y;
		System.out.println ("===========================");
		System.out.print("Volume Silinder adalah = "+v);
	}	
}
class kerucut extends volume
{
	public void hitung1(double a, double b)
	{
		double l=(22/7)*a*a;
		double vole=(l*b)/3;
		System.out.println ("\n===========================");
		System.out.print("Volume Kerucut adalah = "+vole);
	}
}
abstract class ccoba{
		abstract public void wow();
		protected  void loh()
		{
			System.out.println("===============================");
		}	
}
class lahdalah extends ccoba{
		public void wow()
		{
			System.out.println("\t>>Perhitungan Volume<<");
		}
	}
class panggil
{
	public static void main (String[] args) {
		lahdalah p = new lahdalah();
    	p.wow();
    	p.loh();
		
		volume vol = new volume();
		vol.masukan();		
}
}